from django.conf.urls.defaults import *
from django.conf import settings

urlpatterns = patterns('brispone.views',
    url(r'^$', 'index', name='index'),
    url(r'^contract/$', 'contract', name='contract'),

    url(r'^m/$', 'mindex', name='mindex'),
    url(r'^m/contract/$', 'mcontract', name='mcontract'),

) + patterns('brispone.views.coupon',
    url(r'^coupon/$', 'list', name='coupons'),
    url(r'^coupon/id/(?P<coupon_id>\w+)/$', 'detail', name='coupon'),
    url(r'^coupon/sms/(?P<coupon_id>\w+)/$', 'send_sms', name='send_coupon_by_sms'),
    
    url(r'^m/coupon/$', 'mlist', name='mcoupons'),
    url(r'^m/coupon/id/(?P<coupon_id>\w+)/$', 'mdetail', name='mcoupon'),

) + patterns('brispone.views.store',
    url(r'^store/$', 'list', name='stores'),
    url(r'^store/id/(?P<store_id>\w+)/$', 'detail', name='store'),
    
    url(r'^m/store/$', 'mlist', name='mstores'),
    url(r'^m/store/id/(?P<store_id>\w+)/$', 'mdetail', name='mstore'),

) + patterns('brispone.views.event',
    url(r'^event/$', 'list', name='events'),
    url(r'^event/id/(?P<event_id>\w+)/$', 'detail', name='event'),
    url(r'^event/increase/$', 'inc_list', name='inc_event'),
    url(r'^event/check_active/$', 'check_active', name='check_active'),
    
    url(r'^m/event/$', 'mlist', name='mevents'),
    url(r'^m/event/id/(?P<event_id>\w+)/$', 'mdetail', name='mevent'),
    url(r'^m/event/increase/$', 'minc_list', name='minc_event'),

) + patterns('',
    url(r'^static/(.*)$', 'django.views.static.serve', {
        'document_root': settings.STATIC_ROOT,
        }, name='base_static'),
    
)
